package cn.edu.zut.soft.student.model;

import java.util.ArrayList;
import java.util.List;

public class SelectCourseExample {
    protected String orderByClause;

    protected boolean distinct;

    protected List<Criteria> oredCriteria;

    public SelectCourseExample() {
        oredCriteria = new ArrayList<>();
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return distinct;
    }

    public List<Criteria> getOredCriteria() {
        return oredCriteria;
    }

    public void or(Criteria criteria) {
        oredCriteria.add(criteria);
    }

    public Criteria or() {
        Criteria criteria = createCriteriaInternal();
        oredCriteria.add(criteria);
        return criteria;
    }

    public Criteria createCriteria() {
        Criteria criteria = createCriteriaInternal();
        if (oredCriteria.size() == 0) {
            oredCriteria.add(criteria);
        }
        return criteria;
    }

    protected Criteria createCriteriaInternal() {
        Criteria criteria = new Criteria();
        return criteria;
    }

    public void clear() {
        oredCriteria.clear();
        orderByClause = null;
        distinct = false;
    }

    protected abstract static class GeneratedCriteria {
        protected List<Criterion> criteria;

        protected GeneratedCriteria() {
            super();
            criteria = new ArrayList<>();
        }

        public boolean isValid() {
            return criteria.size() > 0;
        }

        public List<Criterion> getAllCriteria() {
            return criteria;
        }

        public List<Criterion> getCriteria() {
            return criteria;
        }

        protected void addCriterion(String condition) {
            if (condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            }
            criteria.add(new Criterion(condition));
        }

        protected void addCriterion(String condition, Object value, String property) {
            if (value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value));
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if (value1 == null || value2 == null) {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
            criteria.add(new Criterion(condition, value1, value2));
        }

        public Criteria andSelectcoursestudentidIsNull() {
            addCriterion("SelectCourseStudentID is null");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidIsNotNull() {
            addCriterion("SelectCourseStudentID is not null");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidEqualTo(String value) {
            addCriterion("SelectCourseStudentID =", value, "selectcoursestudentid");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidNotEqualTo(String value) {
            addCriterion("SelectCourseStudentID <>", value, "selectcoursestudentid");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidGreaterThan(String value) {
            addCriterion("SelectCourseStudentID >", value, "selectcoursestudentid");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidGreaterThanOrEqualTo(String value) {
            addCriterion("SelectCourseStudentID >=", value, "selectcoursestudentid");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidLessThan(String value) {
            addCriterion("SelectCourseStudentID <", value, "selectcoursestudentid");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidLessThanOrEqualTo(String value) {
            addCriterion("SelectCourseStudentID <=", value, "selectcoursestudentid");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidLike(String value) {
            addCriterion("SelectCourseStudentID like", value, "selectcoursestudentid");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidNotLike(String value) {
            addCriterion("SelectCourseStudentID not like", value, "selectcoursestudentid");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidIn(List<String> values) {
            addCriterion("SelectCourseStudentID in", values, "selectcoursestudentid");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidNotIn(List<String> values) {
            addCriterion("SelectCourseStudentID not in", values, "selectcoursestudentid");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidBetween(String value1, String value2) {
            addCriterion("SelectCourseStudentID between", value1, value2, "selectcoursestudentid");
            return (Criteria) this;
        }

        public Criteria andSelectcoursestudentidNotBetween(String value1, String value2) {
            addCriterion("SelectCourseStudentID not between", value1, value2, "selectcoursestudentid");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidIsNull() {
            addCriterion("SelectCourseID is null");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidIsNotNull() {
            addCriterion("SelectCourseID is not null");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidEqualTo(String value) {
            addCriterion("SelectCourseID =", value, "selectcourseid");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidNotEqualTo(String value) {
            addCriterion("SelectCourseID <>", value, "selectcourseid");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidGreaterThan(String value) {
            addCriterion("SelectCourseID >", value, "selectcourseid");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidGreaterThanOrEqualTo(String value) {
            addCriterion("SelectCourseID >=", value, "selectcourseid");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidLessThan(String value) {
            addCriterion("SelectCourseID <", value, "selectcourseid");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidLessThanOrEqualTo(String value) {
            addCriterion("SelectCourseID <=", value, "selectcourseid");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidLike(String value) {
            addCriterion("SelectCourseID like", value, "selectcourseid");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidNotLike(String value) {
            addCriterion("SelectCourseID not like", value, "selectcourseid");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidIn(List<String> values) {
            addCriterion("SelectCourseID in", values, "selectcourseid");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidNotIn(List<String> values) {
            addCriterion("SelectCourseID not in", values, "selectcourseid");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidBetween(String value1, String value2) {
            addCriterion("SelectCourseID between", value1, value2, "selectcourseid");
            return (Criteria) this;
        }

        public Criteria andSelectcourseidNotBetween(String value1, String value2) {
            addCriterion("SelectCourseID not between", value1, value2, "selectcourseid");
            return (Criteria) this;
        }

        public Criteria andScore1IsNull() {
            addCriterion("Score1 is null");
            return (Criteria) this;
        }

        public Criteria andScore1IsNotNull() {
            addCriterion("Score1 is not null");
            return (Criteria) this;
        }

        public Criteria andScore1EqualTo(Double value) {
            addCriterion("Score1 =", value, "score1");
            return (Criteria) this;
        }

        public Criteria andScore1NotEqualTo(Double value) {
            addCriterion("Score1 <>", value, "score1");
            return (Criteria) this;
        }

        public Criteria andScore1GreaterThan(Double value) {
            addCriterion("Score1 >", value, "score1");
            return (Criteria) this;
        }

        public Criteria andScore1GreaterThanOrEqualTo(Double value) {
            addCriterion("Score1 >=", value, "score1");
            return (Criteria) this;
        }

        public Criteria andScore1LessThan(Double value) {
            addCriterion("Score1 <", value, "score1");
            return (Criteria) this;
        }

        public Criteria andScore1LessThanOrEqualTo(Double value) {
            addCriterion("Score1 <=", value, "score1");
            return (Criteria) this;
        }

        public Criteria andScore1In(List<Double> values) {
            addCriterion("Score1 in", values, "score1");
            return (Criteria) this;
        }

        public Criteria andScore1NotIn(List<Double> values) {
            addCriterion("Score1 not in", values, "score1");
            return (Criteria) this;
        }

        public Criteria andScore1Between(Double value1, Double value2) {
            addCriterion("Score1 between", value1, value2, "score1");
            return (Criteria) this;
        }

        public Criteria andScore1NotBetween(Double value1, Double value2) {
            addCriterion("Score1 not between", value1, value2, "score1");
            return (Criteria) this;
        }

        public Criteria andScore2IsNull() {
            addCriterion("Score2 is null");
            return (Criteria) this;
        }

        public Criteria andScore2IsNotNull() {
            addCriterion("Score2 is not null");
            return (Criteria) this;
        }

        public Criteria andScore2EqualTo(Double value) {
            addCriterion("Score2 =", value, "score2");
            return (Criteria) this;
        }

        public Criteria andScore2NotEqualTo(Double value) {
            addCriterion("Score2 <>", value, "score2");
            return (Criteria) this;
        }

        public Criteria andScore2GreaterThan(Double value) {
            addCriterion("Score2 >", value, "score2");
            return (Criteria) this;
        }

        public Criteria andScore2GreaterThanOrEqualTo(Double value) {
            addCriterion("Score2 >=", value, "score2");
            return (Criteria) this;
        }

        public Criteria andScore2LessThan(Double value) {
            addCriterion("Score2 <", value, "score2");
            return (Criteria) this;
        }

        public Criteria andScore2LessThanOrEqualTo(Double value) {
            addCriterion("Score2 <=", value, "score2");
            return (Criteria) this;
        }

        public Criteria andScore2In(List<Double> values) {
            addCriterion("Score2 in", values, "score2");
            return (Criteria) this;
        }

        public Criteria andScore2NotIn(List<Double> values) {
            addCriterion("Score2 not in", values, "score2");
            return (Criteria) this;
        }

        public Criteria andScore2Between(Double value1, Double value2) {
            addCriterion("Score2 between", value1, value2, "score2");
            return (Criteria) this;
        }

        public Criteria andScore2NotBetween(Double value1, Double value2) {
            addCriterion("Score2 not between", value1, value2, "score2");
            return (Criteria) this;
        }
    }

    public static class Criteria extends GeneratedCriteria {
        protected Criteria() {
            super();
        }
    }

    public static class Criterion {
        private String condition;

        private Object value;

        private Object secondValue;

        private boolean noValue;

        private boolean singleValue;

        private boolean betweenValue;

        private boolean listValue;

        private String typeHandler;

        public String getCondition() {
            return condition;
        }

        public Object getValue() {
            return value;
        }

        public Object getSecondValue() {
            return secondValue;
        }

        public boolean isNoValue() {
            return noValue;
        }

        public boolean isSingleValue() {
            return singleValue;
        }

        public boolean isBetweenValue() {
            return betweenValue;
        }

        public boolean isListValue() {
            return listValue;
        }

        public String getTypeHandler() {
            return typeHandler;
        }

        protected Criterion(String condition) {
            super();
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if (value instanceof List<?>) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }
        }

        protected Criterion(String condition, Object value) {
            this(condition, value, null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            super();
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, null);
        }
    }
}